A render queue, where all items that have to be rendered are queued. More...
Public Member Functions | |
virtual Buffer * | getAccelerationStructureBuffer () const |
nkMemory::StringView | getName () const |
bool | getRaytraced () const |
bool | getHidden () const |
virtual void | setName (const nkMemory::StringView &name) |
virtual void | setRaytraced (bool value) |
void | setHidden (bool value) |
virtual Entity * | addEntity () |
virtual void | eraseEntity (Entity *ent) |
virtual void | clearQueue () |
unsigned int | getEntityCount () const |
Entity * | getEntity (unsigned int index) const |
unsigned int | getRenderableCount () const |
virtual void | updateEntityNode (Entity *ent) |
virtual void | updateAddMesh (SubEntity *subEnt) |
virtual void | updateDeleteMesh (SubEntity *subEnt) |
virtual void | updateSwapMesh (SubEntity *subEnt) |
virtual void | updateSwapShader (Entity *ent) |
virtual void | updateSwapShaderRaytracing (Entity *ent, Shader *oldShader, Shader *newShader) |
void | appendQueue (RenderQueue *other) |
void | setIndex (unsigned int index) |
unsigned int | getIndex () const |
void | setRenderingQueue (bool value) |
bool | getRenderQueue () const |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
![]() | |
Exportable () | |
virtual | ~Exportable () |
A render queue, where all items that have to be rendered are queued.
A queue can allocate entities to render. The entities can be used as-is, or attached to a Node, using Entity::setParentNode(). When an object is attached to the graph, it enables it to work with the transformations from the nodes.
|
virtual |
Retrieves the acceleration structure's buffer. This buffer can be fed to shaders for raytracing. If raytracing is not supported, this buffer will be empty.
nkMemory::StringView nkGraphics::RenderQueue::getName | ( | ) | const |
bool nkGraphics::RenderQueue::getRaytraced | ( | ) | const |
bool nkGraphics::RenderQueue::getHidden | ( | ) | const |
|
virtual |
name | The name to set. |
|
virtual |
Sets whether this queue should be raytraced. Raytraced queues will keep their acceleration structures updated as they change. Enable this only when needed.
value | If the queue should be raytraced (true) or not (false). |
void nkGraphics::RenderQueue::setHidden | ( | bool | value | ) |
Sets whether the render queue should be hidden from the project exporting functions.
value | If it should be hidden (true) or not (false). |
|
virtual |
Adds an entity into the queue.
|
virtual |
Erases and frees the memory of an entity.
ent | The entity to forget. |
|
virtual |
Clears the queue and makes it empty again.
unsigned int nkGraphics::RenderQueue::getEntityCount | ( | ) | const |
Entity* nkGraphics::RenderQueue::getEntity | ( | unsigned int | index | ) | const |
index | The index of the entity to retrieve. |
unsigned int nkGraphics::RenderQueue::getRenderableCount | ( | ) | const |
|
virtual |
Updates called from registered objects. In theory, external code should not use it.
ent | The caller. |
|
virtual |
Update called from registered object. In theory, external code should not use it.
subEnt | The caller. |
|
virtual |
Update called from registered object. In theory, external code should not use it.
subEnt | The caller. |
|
virtual |
Update called from registered object. In theory, external code should not use it.
subEnt | The caller. |
|
virtual |
Update called from registered object. In theory, external code should not use it.
ent | The caller. |
|
virtual |
Update called from registered object. In theory, external code should not use it.
ent | The caller. |
oldShader | The shader assigned before. |
newShader | The shader to reassign. |
void nkGraphics::RenderQueue::appendQueue | ( | RenderQueue * | other | ) |
Appends another queue. Used when computing the render queue in the RenderQueueManager. This kind of API will change soon, it is best left untouched by external code.
other | The queue to append. |
void nkGraphics::RenderQueue::setIndex | ( | unsigned int | index | ) |
index | The index to set. |
unsigned int nkGraphics::RenderQueue::getIndex | ( | ) | const |
void nkGraphics::RenderQueue::setRenderingQueue | ( | bool | value | ) |
Sets whether the queue is a rendering queue. Rendering queues are queues meant to be prepared to render, and are not populated from usual calls. This API is part of the rendering queue computing and will change soon. It is best left untouched by external code.
value | If the queue is a rendering one (true) or not (false). |
bool nkGraphics::RenderQueue::getRenderQueue | ( | ) | const |
|
overridevirtual |
Basic exporting capabilities.
rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capabilities.
rootNode | The tree to import from. |
Implements nkExport::Exportable.